home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIStyleSheetLinkingElement.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  119 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37. #ifndef nsIStyleSheetLinkingElement_h__
  38. #define nsIStyleSheetLinkingElement_h__
  39.  
  40.  
  41. #include "nsISupports.h"
  42.  
  43. class nsIParser;
  44. class nsIDocument;
  45. class nsICSSLoaderObserver;
  46.  
  47. #define NS_ISTYLESHEETLINKINGELEMENT_IID          \
  48.   {0xa6cf90e9, 0x15b3, 0x11d2,                    \
  49.   {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
  50.  
  51. class nsIStyleSheet;
  52.  
  53. class nsIStyleSheetLinkingElement : public nsISupports {
  54. public:
  55.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLESHEETLINKINGELEMENT_IID)
  56.  
  57.   /**
  58.    * Used to make the association between a style sheet and
  59.    * the element that linked it to the document.
  60.    *
  61.    * @param aStyleSheet the style sheet associated with this
  62.    *                    element.
  63.    */
  64.   NS_IMETHOD SetStyleSheet(nsIStyleSheet* aStyleSheet) = 0;
  65.  
  66.   /**
  67.    * Used to obtain the style sheet linked in by this element.
  68.    *
  69.    * @param aStyleSheet out parameter that returns the style
  70.    *                    sheet associated with this element.
  71.    */
  72.   NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aStyleSheet) = 0;
  73.  
  74.   /**
  75.    * Initialize the stylesheet linking element. This method passes
  76.    * in a parser that the element blocks if the stylesheet is
  77.    * a stylesheet that should be loaded with the parser blocked.
  78.    * If aDontLoadStyle is true the element will ignore the first
  79.    * modification to the element that would cause a stylesheet to
  80.    * be loaded. Subsequent modifications to the element will not
  81.    * be ignored.
  82.    */
  83.   NS_IMETHOD InitStyleLinkElement(nsIParser *aParser, PRBool aDontLoadStyle) = 0;
  84.  
  85.   /**
  86.    * Tells this element to update the stylesheet.
  87.    *
  88.    * @param aOldDocument the document that this element was part
  89.    *                     of (nsnull if we're not moving the element
  90.    *                     from one document to another).
  91.    * @param aObserver    observer to notify once the stylesheet is loaded.
  92.    *                     It might be notified before the function returns.
  93.    */
  94.   NS_IMETHOD UpdateStyleSheet(nsIDocument *aOldDocument,
  95.                               nsICSSLoaderObserver* aObserver) = 0;
  96.  
  97.   /**
  98.    * Tells this element wether to update the stylesheet when the
  99.    * element's properties change.
  100.    *
  101.    * @param aEnableUpdates update on changes or not.
  102.    */
  103.   NS_IMETHOD SetEnableUpdates(PRBool aEnableUpdates) = 0;
  104.  
  105.   /**
  106.    * Gets the charset that the element claims the style sheet is in
  107.    *
  108.    * @param aCharset the charset
  109.    */
  110.   NS_IMETHOD GetCharset(nsAString& aCharset) = 0;
  111.  
  112.   // This doesn't entirely belong here since they only make sense for
  113.   // some types of linking elements, but it's a better place than
  114.   // anywhere else.
  115.   virtual void SetLineNumber(PRUint32 aLineNumber) = 0;
  116. };
  117.  
  118. #endif // nsILinkingElement_h__
  119.